<%@LANGUAGE="VBSCRIPT"%> Forestry Administration: Community Forestry <% Dim QCF Dim QCF_numRows dim ProID ProID= request.QueryString("ProID") Set QCF = Server.CreateObject("ADODB.Recordset") QCF.ActiveConnection = MM_CFonWEB_STRING if isempty(ProID)=False then QCF.Source = "SELECT DISTINCT Province.Province, Province.ProvinceKH, CFName.CFID,CFName.CF_NameKH, CFName.CF_Name, CFForestry.ForestArea, CFForestry.CF_Forest_TypeKH, CFForestry.CF_Forest_type, CF.[Date Established] as EstablishedDate, Province.ProvinceID FROM (Province LEFT JOIN ((CF LEFT JOIN CFName ON CF.CFID = CFName.CFID) RIGHT JOIN Location ON CF.CFID = Location.CFID) ON Province.ProvinceID = Location.ProvinceID) LEFT JOIN CFForestry ON CFName.CFID = CFForestry.CFID WHERE (((Str([Province].[ProvinceID]))=" & ProID & ")) ORDER BY CFName.CFID;" else QCF.Source = "SELECT DISTINCT Province.Province, Province.ProvinceKH, CFName.CFID, CFName.CF_NameKH, CFName.CF_Name, CFForestry.ForestArea, CFForestry.CF_Forest_TypeKH, CFForestry.CF_Forest_type, CF.[Date Established] as EstablishedDate, Province.ProvinceID FROM (Province LEFT JOIN ((CF LEFT JOIN CFName ON CF.CFID = CFName.CFID) RIGHT JOIN Location ON CF.CFID = Location.CFID) ON Province.ProvinceID = Location.ProvinceID) LEFT JOIN CFForestry ON CFName.CFID = CFForestry.CFID ORDER BY CFName.CFID;" end if QCF.CursorType = 2 QCF.CursorLocation = 2 QCF.LockType = 3 QCF.Open() QCF_numRows = 0 '--------------------------->>>>>>>>>>> Data Record set <<<<<<<<<<<--------------------------- %>
Home
?subject=CF in provice English?&body=List down your Name and position before your comment." onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','../Pic/MenuKh/Eng-CFCommentOver.gif',1)">

Community Forestry In <% if isempty(ProID)=False then response.write(QCF.Fields.Item("Province").Value) else response.write("Province") end if %>

<% dim i i=1 if not qcf.bof then while (Not QCF.EOF) if i mod 2 then response.write("") else response.write("") end if response.write("") 'response.write("") response.write("") response.write("") if isnull(QCF.Fields.Item("ForestArea").Value)= false then response.write("") SumForestArea= SumForestArea + QCF.Fields.Item("ForestArea").Value else response.write("") end if response.write("") response.write("") qcf.movenext i=i+1 Wend end if %>
CF ID CF Name Forest Type Forest Area Established Date
" & left(QCF.Fields.Item("CFID").Value,3) & " " & (QCF.Fields.Item("Province").Value) & "" & (QCF.Fields.Item("CF_Name").Value) & " " & (QCF.Fields.Item("CF_Forest_type").Value) & " " & setcama(QCF.Fields.Item("ForestArea").Value,True) & " 0.00" & (QCF.Fields.Item("EstablishedDate").Value) & " 
Total <%=setcama(SumForestArea,True)%>
<% QCF.Close() Set QCF = Nothing function SetCama(Numbers,DecimalPointYesNo) ThousandDevideString = "," DecimalPoint="." If Numbers > 0 Then dot = False For K = 1 To Len(Numbers) If Mid(Numbers, K, 1) = "." Then strright = Mid(Numbers, K, 3) If strright = "." Or strright = "" Then strright = DecimalPoint & "00" Else strright = Mid(Numbers, K + 1, 2) If Len(strright) = 1 Then strright = strright & "0" End If End If StrLeft = Mid(Numbers, 1, K - 1) If StrLeft = "" Then StrLeft = "0" End If dot = True Exit For End If Next If dot = True Then lenght = Len(StrLeft) If lenght > 3 Then j = 0 For K = 1 To lenght Step 3 j = j + 1 If K = 1 Then SetCama = Right(StrLeft, 3) Else SetCama = Right(StrLeft, 3) & ThousandDevideString & SetCama End If If Len(StrLeft) > 3 Then StrLeft = Left(StrLeft, Len(StrLeft) - 3) End If Next SetCama = SetCama & DecimalPoint & strright Else SetCama = StrLeft & DecimalPoint & strright End If Else If DecimalPointYesNo = True Then strright = DecimalPoint & "00" Else strright = "" End If StrLeft = Numbers lenght = Len(StrLeft) If lenght > 3 Then j = 0 For K = 1 To lenght Step 3 j = j + 1 If K = 1 Then SetCama = Right(StrLeft, 3) Else SetCama = Right(StrLeft, 3) & ThousandDevideString & SetCama End If If Len(StrLeft) > 3 Then StrLeft = Left(StrLeft, Len(StrLeft) - 3) End If Next SetCama = SetCama & strright Else SetCama = StrLeft & strright End If End If Else If DecimalPointYesNo = True Then SetCama = "0" & DecimalPoint & "00" Else SetCama = "0" End If End If end function %>
">